# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# 
# T2 SDE: package/.../inkscapelite/inkscapelite.conf
# Copyright (C) 2014 The T2 SDE Project
# 
# More information can be found in the files COPYING and README.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- T2-COPYRIGHT-NOTE-END ---

#hook_add preconf 3 autoconf
#var_append GCC_WRAPPER_INSERT " " "-fpermissive"

# BK gnome-print causes crash:
# this app needs libpng12 to compile (good, that's what i'm using)

# 150101 seems mmx has asm code, broken for amd64:
if [[ $libdir == *lib64 ]]; then
 var_append confopt ' ' '--with-popt --with-xft --without-gnome-print --disable-mmx'
else
 var_append confopt ' ' '--with-popt --with-xft --without-gnome-print --enable-mmx'
fi

#inklite_find_xorg()
#{
# export CFLAGS='-I/usr/X11R7/include'
# export LDFLAGS='-I/usr/X11R7/include -L/usr/X11R7/lib'
# export LD_LIBRARY_PATH="/usr/X11R7/lib:${LD_LIBRARY_PATH}"
#}
#hook_add preconf 5 "inklite_find_xorg"

# BK see also ffmpeg, has same problem.
# BK had to manually create symlink freetype to usr/include/freetype2:
inklite_find_freetype()
{
 ln -s freetype2 $root/usr/include/freetype
}

hook_add preconf 5 "inklite_find_freetype"

# leave this in, gives an error msg creating binary tarball: no, leave in, tarball still created:
inklite_remove_link()
{
 rm -f $root/usr/include/freetype
}

hook_add postmake 7 "inklite_remove_link"

# BK gcc does not understand --export-dynamic
#160416 BK need -lm
inklite_export_dynamic()
{
 sed -i -e 's%\-\-export\-dynamic %-lm %' src/Makefile
}

hook_add premake 6 "inklite_export_dynamic"

# 150101 found shared files with 'ffmpeg' !!!
check_shared=0
